Reference | lineto()


Syntax
lineto(x, y)

DescriptionThe lineto() command must be called between beginpath() and endpath(). Draws a line between the current point in the path and a new destination point. The two parameters set the location of the new destination point.
Tutorial
Paths


Example
nofill()
stroke(0.2)
beginpath(10, 10)
lineto(40, 40)
lineto(80, 40)
endpath()